import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'Login',
        redirect: '/login',
    },
    {
        path: '/login',
        name: 'login',
        component: () =>
            import ('../views/Login/Login.vue'),
    },
    {
        path: '/home',
        name: 'Home',
        component: () =>
            import ('../views/Home/childrenviews/Home.vue'),
        meta: { showTabBar: true }
    },
    {
        path: '/mine',
        name: 'Mine',
        component: () =>
            import ('../views/Home/childrenviews/Mine.vue'),
        meta: { showTabBar: true }
    },
    {
        path: '/collect',
        name: 'Collect',
        component: () =>
            import ('../views/Home/childrenviews/Collect.vue'),
        meta: { showTabBar: true }
    },
    {
        path: '/listdetail/:id',
        name: 'Listdetail',
        component: () =>
            import ('../views/detail/DeCollect.vue'),
        meta: { showTabBar: true }
    },
]

const router = new VueRouter({
    routes
})

export default router